import http from '@/utils/request'

// 查询账户列表
export function listAccount (query) {
  return http({
    url: '/backstage/authority/usermanage',
    method: 'get',
    params: query
  })
}

// 查询账户详细
export function getAccount (id) {
  return http({
    url: '/backstage/authority/usermanage/' + id,
    method: 'get'
  })
}

// 新增账户
export function addAccount (data) {
  return http({
    url: '/backstage/authority/usermanage',
    method: 'post',
    data: data
  })
}

// 修改账户
export function updateAccount (data) {
  return http({
    url: '/backstage/authority/usermanage',
    method: 'put',
    data: data
  })
}

// 删除账户
export function delAccount (ids) {
  return http({
    url: '/backstage/authority/usermanage',
    method: 'delete',
    params:{ids}
  })
}
// 上传头像

export function uploadPhoto(id){
  return http({
    url: '/backstage/authority/usermanage/' + id+'/uploadPhoto',
    method: 'post',
    params:{id}
  })
}
